'use strict';
const requireEx=require('yi-require');
const $ = requireEx('yi-schema');
module.exports = {
	query: $.object({
		page: $.object({
			size: $.number().integer().positive().default(10),
			index: $.number().integer().positive().default(1)
		}),
		filter: $.object({
			_id:[$.object({"$in":$.array().items($.mongoid())}).description("_id"),$.mongoid()],
			title:$.string().min(1).max(20).description("客户名称"),
			name:$.string().min(1).max(10).description("联系姓名"),
			mobile:$.mobile().description("手机号"),
			account:$.string().description("登录账号"),
			endDate:$.date().description("截止有效期"),
			userNo:$.number().integer().positive().description('用户数'),
			state:$.string().valid("上线中","已下线").description('状态')
		}),
		sort: $.object({
			endDate: $.number().valid(-1, 1),
			createTime: $.number().valid(-1, 1)
		})
	})
};
